﻿using System;
using System.IO;

namespace FileMain
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Console.WriteLine("文件路径:");
            var path = Console.ReadLine();
            var newpath = path + DateTime.Now.ToString("yyyyMMdd");
            if (string.IsNullOrWhiteSpace(path))
            {
                Console.WriteLine("path错误");
            }

            ///遍历获取文件路径
            //DirectoryInfo directoryInfo = new DirectoryInfo(path);
            //FileNameReplace.GetFileList(directoryInfo);
            //var list = FileNameReplace.FileList;

            DirectoryInfo directoryInfo2 = new DirectoryInfo(newpath);
            if (!directoryInfo2.Exists)
            {
                directoryInfo2.Create();
            }
            string replacevalue = ".下载";
            FileNameReplace.CopyDirectory(path, newpath, replacevalue);
        }
    }
}
